import tkinter as tk

class FuncArgsFrame(tk.Frame):
    def __init__(self, master, args_dict:dict,**kwargs):
        super().__init__(master,highlightbackground="grey", highlightthickness=2, **kwargs)
        self.args_dict = args_dict

        self.args = tk.Label(self, text='函数参数入口:')
        self.args.pack(side='top', anchor='nw')

        self.args_frame = tk.Frame(self)
        # self.args_frame_widget()
        self.args_frame.columnconfigure(0,weight=1)
        self.args_frame.columnconfigure(1, weight=1)
        self.args_frame.pack(fill='x')
        self.pack(padx=5,pady=10,ipadx=5,ipady=5, fill='x')

    def args_frame_widget(self):
        index = 0
        self.arg_label_list = []
        self.arg_entry_list = []
        for key,value in self.args_dict.items():
            self.arg_label = tk.Label(self.args_frame, text=key)
            self.arg_entry = tk.Label(self.args_frame, text=value)
            self.arg_label.grid(row=index, column=0)
            self.arg_entry.grid(row=index, column=1)
            self.arg_label_list.append(self.arg_label)
            self.arg_entry_list.append(self.arg_entry)
            index += 1


if __name__ == '__main__':
    window = tk.Tk()
    window.title("亲情导出")
    window.geometry('400x300')
    fileWindow = FuncArgsFrame(window)

    window.mainloop()